package com.exce2;

/**
 * @Author WaveHi
 * @Date 6/8/2021 上午 11:04
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description 猫猫
 */
public class Cat extends PetD implements Pet{

    public Cat() {

        System.out.println("I am the constructor of no parameter.");

    }

    public Cat(String  name,int age) {

        this();
        this.setName(name);
        this.setAge(age);

    }

    /**
     * 打招呼
     */
    public void sayHi() {

        System.out.println("Hello! I am " + this.getName());

    }
}
